#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

#if 0
void print(int* arr, int sz)
{
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", *(arr + i));
	}
}

int main() {
	int arr[] = { 1,2,3,4,5,6,7,8,9,10 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	print(arr, sz);

	return 0;
}
#endif
void pupple(int a[], int sz)
{
	for (int i = 0; i < sz - 1; i++)
	{
		int flag = 0;
		for (int j = 0; j < sz - 1 - i; j++)
		{
			if (a[j] > a[j + 1])
			{
				int tmep = 0;
				tmep = a[j ];
				a[j] = a[j+1];
				a[j+1] = tmep;
				flag = 1;
			}
		}
		if (flag = 0)
			break;
	}
}
void print(int a[], int sz)
{
	for (int i = 0; i < sz; i++)
	{
		printf("%d", a[i]);
	}
}
int main()
{
	int arr[] = { 1,3,4,5,2,6,8,7,9,10 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	pupple(arr, sz);
	print(arr, sz);
	return 0;
}

